package cn.itcast.health.mapper;

import cn.itcast.health.pojo.Menu;
import cn.itcast.health.pojo.Permission;
import cn.itcast.health.pojo.Role;
import cn.itcast.health.pojo.User;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;
import java.util.Set;

public interface UserMapper {
    User findUserByUserName(@Param("username") String username);

    Set<Role> findRolesByUid(@Param("id") Integer id);

    Set<Permission> findPermissionsByRoleId(@Param("id") Integer id);

    List findMenuByRoleId(@Param("rolr_id") Integer rolr_id);

    Menu findMenuByMenuIdAndLevel(@Param("menu_id") Object menu_id);

    List<Menu> findMenuChildByMenuId(@Param("id") Integer id);

    List<Map> getGenderAndCount();

    List<Map> getBirthdayAndCount();
}
